package com.icloud.system.boot.controller.admin;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.icloud.common.core.api.CommonResult;
import com.icloud.common.web.annotation.Permission;
import com.icloud.system.boot.model.AdminOperationLog;
import com.icloud.system.boot.query.OperationLogQuery;
import com.icloud.system.boot.service.AdminOperationLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "后台操作日志接口")
@RequestMapping("/admin/operationLog")
@RequiredArgsConstructor
public class AdminOperationLogController {
    private final AdminOperationLogService adminOperationLogService;

    @ApiOperation("分页")
    @GetMapping("/page")
    @Permission("system.operationLog.page")
    public CommonResult<IPage<AdminOperationLog>> page(OperationLogQuery query){
        return CommonResult.success(adminOperationLogService.page(query));
    }


}
